package springasync;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

/**
 * @ClassName AsynchronousTest
 * @Description
 * @Author yuhang11
 * @Date 2022/1/4 3:17 下午
 * @Version 1.0
 */
public class AsynchronousTest {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        AsynchronousService asynchronousService = new AsynchronousService();
        Future future = asynchronousService.springAsynchronousMethod();
        Integer result = (Integer) future.get();
        System.out.println("收到异步通信结果：" + result);
    }
}
